package com.kb.mapper.mysql;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kb.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserDao extends BaseMapper<User> {
    @Select("SELECT * FROM user WHERE user_name = #{userName}")
    User selectByUserName(String userName);

    @Update("UPDATE user SET daily_call_count = 0")
    void resetDailyCallCount();
}